{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "db74a9d3-f7a0-4ee3-a382-2bd155603716",
   "metadata": {
    "id": "db74a9d3-f7a0-4ee3-a382-2bd155603716"
   },
   "source": [
    "# Using RL Zoo Baseline3\n",
    "\n",
    "\n",
    "[`RL Baselines3 Zoo`](https://rl-baselines3-zoo.readthedocs.io/en/master/) is a training framework for Reinforcement Learning (RL), using Stable Baselines3 (SB3), reliable implementations of reinforcement learning algorithms in PyTorch. It provides scripts for training, evaluating agents, tuning hyperparameters, plotting results and recording videos. In addition, it includes a collection of tuned hyperparameters for common environments and RL algorithms, and agents trained with those settings.\n",
    "\n",
    "Github repository: https://github.com/DLR-RM/rl-baselines3-zoo\n",
    "\n",
    "In this notebook, we will train and record demos as well as push the trained agents to Huggingface - all using RL Zoo sb3.\n",
    "\n",
    "RL Zoo is supposed to be run from command line. However, we can use python notebooks to run commands using \"!\" bang character before the commands e.g., to run `pwd` unix command to list the current working directory, we can execute following command in a code cell `!pwd`.\n",
    "\n",
    "We have been using this to install the dependencies while running these notebooks in Google Colab e.g.\n",
    "```\n",
    "!pip install \"stable-baselines3[extra]\n",
    "```"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "003c0b31-0505-4e93-bd72-f56a7be189f6",
   "metadata": {
    "id": "003c0b31-0505-4e93-bd72-f56a7be189f6"
   },
   "source": [
    "#### Running in Colab/Kaggle\n",
    "\n",
    "If you are running this on Colab, please uncomment below cell and run this to install required dependencies."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "be8fb0b6-322b-4d4e-809a-ad6e1e332395",
   "metadata": {},
   "outputs": [],
   "source": [
    "## uncomment and execute this cell to install all the the dependencies if running in Google Colab or Kaggle\n",
    "# !apt-get update \n",
    "# !apt-get install -y swig cmake ffmpeg freeglut3-dev xvfb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "34f691e8-771d-476d-959d-e0ab266a900b",
   "metadata": {
    "id": "34f691e8-771d-476d-959d-e0ab266a900b"
   },
   "outputs": [],
   "source": [
    "## Uncomment and execute this cell to install all the the dependencies if running in Google Colab or Kaggle\n",
    "\n",
    "## Uncomment and run for Colab\n",
    "# !git clone https://github.com/nsanghi/drl-2ed\n",
    "# %cd /content/drl-2ed \n",
    "# !pip install  -r requirements.txt\n",
    "# %cd chapter2\n",
    "\n",
    "\n",
    "## Uncomment and run for Kaggle\n",
    "# !git clone https://github.com/nsanghi/drl-2ed\n",
    "# %cd /kaggle/working/drl-2ed \n",
    "# !pip install  -r requirements.txt\n",
    "# %cd chapter2"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fe3b5184-cbee-4342-977c-b770effdd747",
   "metadata": {
    "id": "fe3b5184-cbee-4342-977c-b770effdd747"
   },
   "source": [
    "## Training LunarLander using DQN\n",
    "\n",
    "Same as Listing 2.3 - except this time done using RL Zoo\n",
    "\n",
    "Please note that the default parameters printed at the start of executing below command can be changed. You can refer to RL Zoo documentation for more details. Please also note that these default parameters are different form the the defaults while running the `model.train` from `stablebaseline3` - https://stable-baselines3.readthedocs.io/en/master/modules/dqn.html#stable_baselines3.dqn.DQN"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a3f754fc-7b65-4c7c-8ba7-36b5992674fa",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "a3f754fc-7b65-4c7c-8ba7-36b5992674fa",
    "outputId": "3e1023ca-8d8c-46ea-f8c3-9758adc168e2"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2024-03-05 12:24:28.684376: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
      "2024-03-05 12:24:28.697169: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:24:29.419017: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "2024-03-05 12:24:29.419213: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "2024-03-05 12:24:29.419402: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2024-03-05 12:24:29.513832: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:24:29.517931: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2024-03-05 12:24:34.584265: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
      "========== LunarLander-v2 ==========\n",
      "Seed: 2545653355\n",
      "Loading hyperparameters from: /home/nsanghi/sandbox/apress/drl-2ed/venv39/lib/python3.9/site-packages/rl_zoo3/hyperparams/dqn.yml\n",
      "Default hyperparameters for environment (ones being tuned will be overridden):\n",
      "OrderedDict([('batch_size', 128),\n",
      "             ('buffer_size', 50000),\n",
      "             ('exploration_final_eps', 0.1),\n",
      "             ('exploration_fraction', 0.12),\n",
      "             ('gamma', 0.99),\n",
      "             ('gradient_steps', -1),\n",
      "             ('learning_rate', 0.00063),\n",
      "             ('learning_starts', 0),\n",
      "             ('n_timesteps', 100000.0),\n",
      "             ('policy', 'MlpPolicy'),\n",
      "             ('policy_kwargs', 'dict(net_arch=[256, 256])'),\n",
      "             ('target_update_interval', 250),\n",
      "             ('train_freq', 4)])\n",
      "Using 1 environments\n",
      "Overwriting n_timesteps with n=100000\n",
      "Creating test environment\n",
      "Using cpu device\n",
      "Log path: logs/dqn/LunarLander-v2_3\n",
      "\u001b[2K\u001b[35m   1%\u001b[0m \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m721/100,000 \u001b[0m [ \u001b[33m0:03:26\u001b[0m < \u001b[36m14:56:15\u001b[0m , \u001b[31m2 it/s\u001b[0m ]^C\n",
      "\u001b[2K\u001b[35m   1%\u001b[0m \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m724/100,000 \u001b[0m [ \u001b[33m0:03:26\u001b[0m < \u001b[36m14:36:25\u001b[0m , \u001b[31m2 it/s\u001b[0m ]\n",
      "\u001b[?25hSaving to logs/dqn/LunarLander-v2_3\n"
     ]
    }
   ],
   "source": [
    "# Train a DQN agent on LunarLander-v2\n",
    "\n",
    "!python -m rl_zoo3.train --algo dqn --env LunarLander-v2 --n-timesteps 100000 --log-interval 400 --progress"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8cd16fe3-8316-4362-a2d8-9301b5735b2b",
   "metadata": {
    "id": "8cd16fe3-8316-4362-a2d8-9301b5735b2b"
   },
   "source": [
    "## Evaluting the agent\n",
    "\n",
    "We will now evaluate the above trained agent by loading the best model saved by above command.\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "693263c2-c7c5-4948-bc58-d9b388201aef",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "693263c2-c7c5-4948-bc58-d9b388201aef",
    "outputId": "0e9e7882-ff2c-4b8d-edd5-47e8f1ba88cd"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2024-03-05 12:28:22.056854: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
      "2024-03-05 12:28:22.062871: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:28:22.264815: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "2024-03-05 12:28:22.265060: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "2024-03-05 12:28:22.265124: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2024-03-05 12:28:22.287932: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:28:22.288677: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2024-03-05 12:28:24.633974: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
      "Loading latest experiment, id=3\n",
      "Loading logs/dqn/LunarLander-v2_3/LunarLander-v2.zip\n",
      "Episode Reward: -519.89\n",
      "Episode Length 83\n",
      "Episode Reward: -740.56\n",
      "Episode Length 148\n",
      "Episode Reward: -761.05\n",
      "Episode Length 85\n",
      "Episode Reward: -718.95\n",
      "Episode Length 80\n",
      "Episode Reward: -677.81\n",
      "Episode Length 78\n",
      "Episode Reward: -538.19\n",
      "Episode Length 107\n",
      "Episode Reward: -564.70\n",
      "Episode Length 102\n",
      "Episode Reward: -645.47\n",
      "Episode Length 68\n",
      "Episode Reward: -749.27\n",
      "Episode Length 83\n",
      "Episode Reward: -465.92\n",
      "Episode Length 103\n",
      "Episode Reward: -426.94\n",
      "Episode Length 100\n",
      "Episode Reward: -689.30\n",
      "Episode Length 80\n",
      "Episode Reward: -643.95\n",
      "Episode Length 87\n",
      "Episode Reward: -590.67\n",
      "Episode Length 92\n",
      "Episode Reward: -543.78\n",
      "Episode Length 76\n",
      "Episode Reward: -532.91\n",
      "Episode Length 98\n",
      "Episode Reward: -532.75\n",
      "Episode Length 88\n",
      "Episode Reward: -581.54\n",
      "Episode Length 94\n",
      "Episode Reward: -656.34\n",
      "Episode Length 79\n",
      "Episode Reward: -658.09\n",
      "Episode Length 70\n",
      "Episode Reward: -649.13\n",
      "Episode Length 84\n",
      "Episode Reward: -732.93\n",
      "Episode Length 80\n",
      "Episode Reward: -705.77\n",
      "Episode Length 76\n",
      "Episode Reward: -486.09\n",
      "Episode Length 95\n",
      "Episode Reward: -645.96\n",
      "Episode Length 93\n",
      "Episode Reward: -573.31\n",
      "Episode Length 77\n",
      "Episode Reward: -669.83\n",
      "Episode Length 78\n",
      "Episode Reward: -317.11\n",
      "Episode Length 114\n",
      "Episode Reward: -711.40\n",
      "Episode Length 83\n",
      "Episode Reward: -463.32\n",
      "Episode Length 99\n",
      "Episode Reward: -592.62\n",
      "Episode Length 76\n",
      "Episode Reward: -591.51\n",
      "Episode Length 75\n",
      "Episode Reward: -398.36\n",
      "Episode Length 116\n",
      "Episode Reward: -678.71\n",
      "Episode Length 79\n",
      "Episode Reward: -383.15\n",
      "Episode Length 110\n",
      "Episode Reward: -603.07\n",
      "Episode Length 91\n",
      "Episode Reward: -661.83\n",
      "Episode Length 98\n",
      "Episode Reward: -501.05\n",
      "Episode Length 96\n",
      "Episode Reward: -674.45\n",
      "Episode Length 83\n",
      "Episode Reward: -639.23\n",
      "Episode Length 100\n",
      "Episode Reward: -649.55\n",
      "Episode Length 86\n",
      "Episode Reward: -546.64\n",
      "Episode Length 97\n",
      "Episode Reward: -692.24\n",
      "Episode Length 135\n",
      "Episode Reward: -617.17\n",
      "Episode Length 104\n",
      "Episode Reward: -466.07\n",
      "Episode Length 92\n",
      "Episode Reward: -640.09\n",
      "Episode Length 93\n",
      "Episode Reward: -700.69\n",
      "Episode Length 80\n",
      "Episode Reward: -417.16\n",
      "Episode Length 93\n",
      "Episode Reward: -620.11\n",
      "Episode Length 99\n",
      "Episode Reward: -637.94\n",
      "Episode Length 72\n",
      "Episode Reward: -741.48\n",
      "Episode Length 84\n",
      "Episode Reward: -689.08\n",
      "Episode Length 106\n",
      "Episode Reward: -591.75\n",
      "Episode Length 82\n",
      "Episode Reward: -730.26\n",
      "Episode Length 84\n",
      "54 Episodes\n",
      "Mean reward: -604.76 +/- 103.58\n",
      "Mean episode length: 90.94 +/- 15.06\n"
     ]
    }
   ],
   "source": [
    "!python -m rl_zoo3.enjoy --algo dqn --env LunarLander-v2 --no-render --n-timesteps 5000 --folder logs/"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "75847c5a-022d-4fb8-aebe-db8de8064cf0",
   "metadata": {
    "id": "75847c5a-022d-4fb8-aebe-db8de8064cf0"
   },
   "source": [
    "## Recordig a video\n",
    "\n",
    "Let us now record a video of trained agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ae330f0d-6bf9-46c7-820c-f3665c16d09c",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "ae330f0d-6bf9-46c7-820c-f3665c16d09c",
    "outputId": "9722e8e6-6f4d-48f7-d16c-f9aac9988c11"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2024-03-05 12:30:53.666775: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
      "2024-03-05 12:30:53.671812: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:30:53.787678: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "2024-03-05 12:30:53.787900: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "2024-03-05 12:30:53.787961: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2024-03-05 12:30:53.806477: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:30:53.807157: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2024-03-05 12:30:56.218012: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
      "Loading latest experiment, id=3\n",
      "Loading logs/dqn/LunarLander-v2_3/LunarLander-v2.zip\n",
      "Loading logs/dqn/LunarLander-v2_3/LunarLander-v2.zip\n",
      "Saving video to /home/nsanghi/sandbox/apress/drl-2ed/chapter2/logs/dqn/LunarLander-v2_3/videos/final-model-dqn-LunarLander-v2-step-0-to-step-1000.mp4\n",
      "Moviepy - Building video /home/nsanghi/sandbox/apress/drl-2ed/chapter2/logs/dqn/LunarLander-v2_3/videos/final-model-dqn-LunarLander-v2-step-0-to-step-1000.mp4.\n",
      "Moviepy - Writing video /home/nsanghi/sandbox/apress/drl-2ed/chapter2/logs/dqn/LunarLander-v2_3/videos/final-model-dqn-LunarLander-v2-step-0-to-step-1000.mp4\n",
      "\n",
      "Moviepy - Done !                                                                \n",
      "Moviepy - video ready /home/nsanghi/sandbox/apress/drl-2ed/chapter2/logs/dqn/LunarLander-v2_3/videos/final-model-dqn-LunarLander-v2-step-0-to-step-1000.mp4\n"
     ]
    }
   ],
   "source": [
    "!python -m rl_zoo3.record_video --algo dqn --env LunarLander-v2 --exp-id 0 -f logs/ -n 1000"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "da225b02-c1ce-4a55-8757-d27bebfd1a24",
   "metadata": {
    "id": "da225b02-c1ce-4a55-8757-d27bebfd1a24"
   },
   "source": [
    "## Display the video"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "a7e2d3b6-e038-435e-9572-7f6b5e9b9918",
   "metadata": {
    "id": "a7e2d3b6-e038-435e-9572-7f6b5e9b9918"
   },
   "outputs": [],
   "source": [
    "import base64\n",
    "from pathlib import Path\n",
    "\n",
    "from IPython import display as ipythondisplay\n",
    "\n",
    "\n",
    "def show_videos(video_path=\"\", prefix=\"\"):\n",
    "    \"\"\"\n",
    "    Taken from https://github.com/eleurent/highway-env\n",
    "\n",
    "    :param video_path: (str) Path to the folder containing videos\n",
    "    :param prefix: (str) Filter the video, showing only the only starting with this prefix\n",
    "    \"\"\"\n",
    "    html = []\n",
    "    for mp4 in Path(video_path).glob(\"{}*.mp4\".format(prefix)):\n",
    "        video_b64 = base64.b64encode(mp4.read_bytes())\n",
    "        html.append(\n",
    "            \"\"\"<video alt=\"{}\" autoplay\n",
    "                    loop controls style=\"height: 400px;\">\n",
    "                    <source src=\"data:video/mp4;base64,{}\" type=\"video/mp4\" />\n",
    "                </video>\"\"\".format(\n",
    "                mp4, video_b64.decode(\"ascii\")\n",
    "            )\n",
    "        )\n",
    "    ipythondisplay.display(ipythondisplay.HTML(data=\"<br>\".join(html)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "11c283a2-f88d-47c9-a85a-9bf0b6e277b5",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 421
    },
    "id": "11c283a2-f88d-47c9-a85a-9bf0b6e277b5",
    "outputId": "108874f3-e3f7-4990-af67-d4eb27a01a19"
   },
   "outputs": [
    {
     "data": {
      "text/html": [],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "show_videos(video_path='logs/dqn/LunarLander-v2_1/videos/', prefix='')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c1a7df3c-2345-450b-a42d-df6b73e29247",
   "metadata": {
    "id": "c1a7df3c-2345-450b-a42d-df6b73e29247"
   },
   "source": [
    "## Pushing to Huggingface\n",
    "\n",
    "To share with others, you can push the trained model to huggingface. First we need to login into hugginfcae using the token\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "df650adf-863c-47de-861c-bad83171187f",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 145,
     "referenced_widgets": [
      "3666cf94b07f454fa3667f34c12f6fc7",
      "5f7224dcfcd647178b385d041dd35b38",
      "521a0b215e884669ae296e2ad5caac71",
      "6c8d61c367154f9f89ce9d66c99f794c",
      "9ce6935d017047fbab473efcdaa28e0e",
      "be673a9fd689461fa69589e4b40adfcd",
      "62e5f9c16e0e4586b62514fee83bfb25",
      "a73f5e89df294d3a9406176e3cd1900f",
      "9ef2e2f1e96d4a5388f15ed0277a69a8",
      "59b1102ab8114e859213691e31d9c85a",
      "f4bdd763f6b04096a304de1b3219f8d5",
      "1b307202c8c643279cdacfbad11127d9",
      "5e2e2882e94a406dad31b422806ffea6",
      "f3209f893b3f448d9de89e217a4178fb",
      "7f9d7c562c0a4ddab5816d8340c20512",
      "38228cb123814eeaa08fb9e5dbff3c21",
      "78a21efebaae4da1a018116f0992dbae",
      "778378cd00ca48c4b430d7885cdb8b8c",
      "1d23e6e212f241139ac2193ee3464769",
      "43be3d00c8084307b3b2f1c66745b721",
      "06eecc58fe24434ba7a2528cc7d03c30",
      "df0bb1b88461420baadd49b89d0bba62",
      "00a71fc5ac674a4b99f76449f1bba9e4",
      "71779c8e8c2e4ca5a50a04541e55dd3a",
      "657f848d5244473f91551078882e1883",
      "2eb901aff3984960816215cdc7f8e079",
      "45965301aac1448ba93a6b3db61dc3ca",
      "5ff522f700094524aeb83c16347a2d49",
      "745563848c5d459d9ca3b60df78d495d",
      "78e6603a76f048bbbd86635a5e5bcf88",
      "2353458bff71431280d07105dc5c4ea5",
      "df6c1ad49eed4dd1880e15d278dae493"
     ]
    },
    "id": "df650adf-863c-47de-861c-bad83171187f",
    "outputId": "33a82f7e-a788-4b2e-b3d7-4c80101965a4"
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2024-03-05 12:32:23.516361: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
      "2024-03-05 12:32:23.521803: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:32:23.653626: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "2024-03-05 12:32:23.653701: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "2024-03-05 12:32:23.653746: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2024-03-05 12:32:23.675427: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 12:32:23.677428: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2024-03-05 12:32:26.706825: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n"
     ]
    },
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "3b419573cd1240458f310b213e370b70",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "from huggingface_sb3 import load_from_hub, package_to_hub, push_to_hub\n",
    "from huggingface_hub import notebook_login # To log to our Hugging Face account to be able to upload models to the Hub.\n",
    "\n",
    "notebook_login()\n",
    "!git config --global credential.helper store"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e40312b0",
   "metadata": {},
   "source": [
    "**IMPORTANT**\n",
    "Some users have reported facing following error while running `rl_zoo3.push_to_hub` .\n",
    "\n",
    "```\n",
    "\"Token is required (write-access action) but no token found. You need to provide a token or be logged in to Hugging Face with `huggingface-cli login` or `huggingface_hub.login`. See https://huggingface.co/settings/tokens.\"\n",
    "```\n",
    "\n",
    "In such a case the following command will help you over come the issue\n",
    "\n",
    "```\n",
    "import huggingface_hub\n",
    "\n",
    "huggingface_hub.login(token= <YOUR_HF_TOKEN>,\n",
    "                     write_permission = True,\n",
    "                    add_to_git_credential = True)\n",
    "\t\t\t\t\t\n",
    "```\n",
    "\n",
    "Another alternative is to use following command from command shell where the `venv` or `conda` environment for this repository has been activated and then follow the instructions to set the HuggingFace token.\n",
    "\n",
    "```\n",
    "huggingface-cli login\n",
    "\n",
    "```"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "e274b399-c21c-42de-8d40-c78675888ac8",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "e274b399-c21c-42de-8d40-c78675888ac8",
    "outputId": "7f58ba56-f9b6-4835-e2c4-5f9ca071839f"
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2024-03-05 13:35:31.007397: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.\n",
      "2024-03-05 13:35:31.023515: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 13:35:31.171587: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "2024-03-05 13:35:31.171692: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "2024-03-05 13:35:31.171811: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2024-03-05 13:35:31.284255: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.\n",
      "2024-03-05 13:35:31.285175: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
      "2024-03-05 13:35:32.836003: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
      "Loading latest experiment, id=3\n",
      "Loading logs/dqn/LunarLander-v2_3/LunarLander-v2.zip\n",
      "Uploading to nsanghi/dqn-LunarLander-v2, make sure to have the rights\n",
      "\u001b[38;5;4mℹ This function will save, evaluate, generate a video of your agent,\n",
      "create a model card and push everything to the hub. It might take up to some\n",
      "minutes if video generation is activated. This is a work in progress: if you\n",
      "encounter a bug, please open an issue.\u001b[0m\n",
      "/home/nsanghi/sandbox/apress/drl-2ed/chapter2/hub/dqn-LunarLander-v2 is already a clone of https://huggingface.co/nsanghi/dqn-LunarLander-v2. Make sure you pull the latest changes with `repo.git_pull()`.\n",
      "Download file replay.mp4: 100%|███████████████| 192k/192k [00:01<00:00, 163kB/s]\n",
      "Saving model to: hub/dqn-LunarLander-v2/dqn-LunarLander-v2\n",
      "Saving video to /tmp/tmpr51hlhx7/-step-0-to-step-1000.mp4\n",
      "Moviepy - Building video /tmp/tmpr51hlhx7/-step-0-to-step-1000.mp4.\n",
      "Moviepy - Writing video /tmp/tmpr51hlhx7/-step-0-to-step-1000.mp4\n",
      "\n",
      "Moviepy - Done !                                                                \n",
      "Moviepy - video ready /tmp/tmpr51hlhx7/-step-0-to-step-1000.mp4\n",
      "ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers\n",
      "  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)\n",
      "  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared\n",
      "  libavutil      56. 70.100 / 56. 70.100\n",
      "  libavcodec     58.134.100 / 58.134.100\n",
      "  libavformat    58. 76.100 / 58. 76.100\n",
      "  libavdevice    58. 13.100 / 58. 13.100\n",
      "  libavfilter     7.110.100 /  7.110.100\n",
      "  libswscale      5.  9.100 /  5.  9.100\n",
      "  libswresample   3.  9.100 /  3.  9.100\n",
      "  libpostproc    55.  9.100 / 55.  9.100\n",
      "Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/tmpr51hlhx7/-step-0-to-step-1000.mp4':\n",
      "  Metadata:\n",
      "    major_brand     : isom\n",
      "    minor_version   : 512\n",
      "    compatible_brands: isomiso2avc1mp41\n",
      "    encoder         : Lavf58.29.100\n",
      "  Duration: 00:00:20.02, start: 0.000000, bitrate: 96 kb/s\n",
      "  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 600x400, 91 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc (default)\n",
      "    Metadata:\n",
      "      handler_name    : VideoHandler\n",
      "      vendor_id       : [0][0][0][0]\n",
      "Stream mapping:\n",
      "  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))\n",
      "Press [q] to stop, [?] for help\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0musing cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mprofile High, level 3.1, 4:2:0, 8-bit\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0m264 - core 163 r3060 5db6aa6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\n",
      "Output #0, mp4, to 'hub/dqn-LunarLander-v2/replay.mp4':\n",
      "  Metadata:\n",
      "    major_brand     : isom\n",
      "    minor_version   : 512\n",
      "    compatible_brands: isomiso2avc1mp41\n",
      "    encoder         : Lavf58.76.100\n",
      "  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 600x400, q=2-31, 50 fps, 12800 tbn (default)\n",
      "    Metadata:\n",
      "      handler_name    : VideoHandler\n",
      "      vendor_id       : [0][0][0][0]\n",
      "      encoder         : Lavc58.134.100 libx264\n",
      "    Side data:\n",
      "      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A\n",
      "frame= 1001 fps=450 q=-1.0 Lsize=     225kB time=00:00:19.96 bitrate=  92.2kbits/s speed=8.98x    \n",
      "video:213kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.651984%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mframe I:5     Avg QP:10.53  size:  1957\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mframe P:363   Avg QP:27.68  size:   305\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mframe B:633   Avg QP:29.68  size:   152\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mconsecutive B-frames:  8.1% 18.0% 14.4% 59.5%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mmb I  I16..4: 67.7% 26.1%  6.2%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mmb P  I16..4:  0.2%  0.7%  0.3%  P16..4:  3.2%  0.5%  0.2%  0.0%  0.0%    skip:94.8%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mmb B  I16..4:  0.0%  0.0%  0.1%  B16..8:  2.7%  0.5%  0.1%  direct: 0.1%  skip:96.5%  L0:50.7% L1:45.1% BI: 4.2%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0m8x8 transform intra:39.4% inter:16.1%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mcoded y,uvDC,uvAC intra: 10.9% 15.8% 14.6% inter: 0.3% 0.3% 0.2%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mi16 v,h,dc,p: 78% 14%  8%  0%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mi8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 12% 66%  0%  0%  0%  0%  0%  0%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mi4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 16% 48%  3%  3%  2%  4%  2%  3%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mi8c dc,h,v,p: 89%  5%  5%  1%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mWeighted P-Frames: Y:0.0% UV:0.0%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mref P L0: 85.8%  1.8%  8.6%  3.7%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mref B L0: 80.6% 16.3%  3.1%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mref B L1: 96.1%  3.9%\n",
      "\u001b[1;36m[libx264 @ 0x55ef94eae480] \u001b[0mkb/s:86.77\n",
      "\u001b[38;5;4mℹ Pushing repo dqn-LunarLander-v2 to the Hugging Face Hub\u001b[0m\n",
      "Upload file dqn-LunarLander-v2.zip:  99%|██▉| 1.06M/1.08M [00:04<00:00, 280kB/s]To https://huggingface.co/nsanghi/dqn-LunarLander-v2\n",
      "   4e589d9..16d49ab  main -> main\n",
      "\n",
      "Upload file dqn-LunarLander-v2.zip: 100%|███| 1.08M/1.08M [00:07<00:00, 156kB/s]\n",
      "\u001b[38;5;4mℹ Your model is pushed to the hub. You can view your model here:\n",
      "https://huggingface.co/nsanghi/dqn-LunarLander-v2\u001b[0m\n"
     ]
    }
   ],
   "source": [
    "# Before you run this, change -orga to your huggingface id\n",
    "\n",
    "!python -m rl_zoo3.push_to_hub --algo dqn --env LunarLander-v2 -f logs/ -orga nsanghi -m \"Initial commit\""
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0845cd89-560f-4fb6-a8c6-6d702d8c32f8",
   "metadata": {
    "id": "0845cd89-560f-4fb6-a8c6-6d702d8c32f8"
   },
   "source": [
    "## See model at Huggingface Hub\n",
    "\n",
    "Click on link below to see the stored trained agent and video on huggingface\n",
    "\n",
    "https://huggingface.co/nsanghi/dqn-LunarLander-v2\n",
    "\n",
    "In your case it would look like\n",
    "\n",
    "`https://huggingface.co/<orga>/<algo>-<env>`\n",
    "\n",
    "Please try to follow the same steps to see if you can train the agent from Listing2-4 using RL-Zoo"
   ]
  }
 ],
 "metadata": {
  "accelerator": "GPU",
  "colab": {
   "gpuType": "T4",
   "include_colab_link": true,
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.18"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "00a71fc5ac674a4b99f76449f1bba9e4": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "LabelModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "LabelModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "LabelView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_745563848c5d459d9ca3b60df78d495d",
      "placeholder": "​",
      "style": "IPY_MODEL_78e6603a76f048bbbd86635a5e5bcf88",
      "value": "Your token has been saved to /root/.cache/huggingface/token"
     }
    },
    "06eecc58fe24434ba7a2528cc7d03c30": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "LabelModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "LabelModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "LabelView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_657f848d5244473f91551078882e1883",
      "placeholder": "​",
      "style": "IPY_MODEL_2eb901aff3984960816215cdc7f8e079",
      "value": "Token is valid (permission: write)."
     }
    },
    "1b307202c8c643279cdacfbad11127d9": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "1d23e6e212f241139ac2193ee3464769": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "2353458bff71431280d07105dc5c4ea5": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "2eb901aff3984960816215cdc7f8e079": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "3666cf94b07f454fa3667f34c12f6fc7": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "VBoxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "VBoxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "VBoxView",
      "box_style": "",
      "children": [
       "IPY_MODEL_06eecc58fe24434ba7a2528cc7d03c30",
       "IPY_MODEL_df0bb1b88461420baadd49b89d0bba62",
       "IPY_MODEL_00a71fc5ac674a4b99f76449f1bba9e4",
       "IPY_MODEL_71779c8e8c2e4ca5a50a04541e55dd3a"
      ],
      "layout": "IPY_MODEL_62e5f9c16e0e4586b62514fee83bfb25"
     }
    },
    "38228cb123814eeaa08fb9e5dbff3c21": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "43be3d00c8084307b3b2f1c66745b721": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "45965301aac1448ba93a6b3db61dc3ca": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "521a0b215e884669ae296e2ad5caac71": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "PasswordModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "PasswordModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "PasswordView",
      "continuous_update": true,
      "description": "Token:",
      "description_tooltip": null,
      "disabled": false,
      "layout": "IPY_MODEL_59b1102ab8114e859213691e31d9c85a",
      "placeholder": "​",
      "style": "IPY_MODEL_f4bdd763f6b04096a304de1b3219f8d5",
      "value": ""
     }
    },
    "59b1102ab8114e859213691e31d9c85a": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "5e2e2882e94a406dad31b422806ffea6": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "5f7224dcfcd647178b385d041dd35b38": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_a73f5e89df294d3a9406176e3cd1900f",
      "placeholder": "​",
      "style": "IPY_MODEL_9ef2e2f1e96d4a5388f15ed0277a69a8",
      "value": "<center> <img\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.svg\nalt='Hugging Face'> <br> Copy a token from <a\nhref=\"https://huggingface.co/settings/tokens\" target=\"_blank\">your Hugging Face\ntokens page</a> and paste it below. <br> Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file. </center>"
     }
    },
    "5ff522f700094524aeb83c16347a2d49": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "62e5f9c16e0e4586b62514fee83bfb25": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": "center",
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": "flex",
      "flex": null,
      "flex_flow": "column",
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": "50%"
     }
    },
    "657f848d5244473f91551078882e1883": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "6c8d61c367154f9f89ce9d66c99f794c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "CheckboxModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "CheckboxModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "CheckboxView",
      "description": "Add token as git credential?",
      "description_tooltip": null,
      "disabled": false,
      "indent": true,
      "layout": "IPY_MODEL_1b307202c8c643279cdacfbad11127d9",
      "style": "IPY_MODEL_5e2e2882e94a406dad31b422806ffea6",
      "value": true
     }
    },
    "71779c8e8c2e4ca5a50a04541e55dd3a": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "LabelModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "LabelModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "LabelView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_2353458bff71431280d07105dc5c4ea5",
      "placeholder": "​",
      "style": "IPY_MODEL_df6c1ad49eed4dd1880e15d278dae493",
      "value": "Login successful"
     }
    },
    "745563848c5d459d9ca3b60df78d495d": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "778378cd00ca48c4b430d7885cdb8b8c": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "LabelModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "LabelModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "LabelView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_1d23e6e212f241139ac2193ee3464769",
      "placeholder": "​",
      "style": "IPY_MODEL_43be3d00c8084307b3b2f1c66745b721",
      "value": "Connecting..."
     }
    },
    "78a21efebaae4da1a018116f0992dbae": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "78e6603a76f048bbbd86635a5e5bcf88": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "7f9d7c562c0a4ddab5816d8340c20512": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ButtonStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ButtonStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "button_color": null,
      "font_weight": ""
     }
    },
    "9ce6935d017047fbab473efcdaa28e0e": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "ButtonModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "ButtonModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "ButtonView",
      "button_style": "",
      "description": "Login",
      "disabled": false,
      "icon": "",
      "layout": "IPY_MODEL_f3209f893b3f448d9de89e217a4178fb",
      "style": "IPY_MODEL_7f9d7c562c0a4ddab5816d8340c20512",
      "tooltip": ""
     }
    },
    "9ef2e2f1e96d4a5388f15ed0277a69a8": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "a73f5e89df294d3a9406176e3cd1900f": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "be673a9fd689461fa69589e4b40adfcd": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "HTMLModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "HTMLModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "HTMLView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_38228cb123814eeaa08fb9e5dbff3c21",
      "placeholder": "​",
      "style": "IPY_MODEL_78a21efebaae4da1a018116f0992dbae",
      "value": "\n<b>Pro Tip:</b> If you don't already have one, you can create a dedicated\n'notebooks' token with 'write' access, that you can then easily reuse for all\nnotebooks. </center>"
     }
    },
    "df0bb1b88461420baadd49b89d0bba62": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "LabelModel",
     "state": {
      "_dom_classes": [],
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "LabelModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/controls",
      "_view_module_version": "1.5.0",
      "_view_name": "LabelView",
      "description": "",
      "description_tooltip": null,
      "layout": "IPY_MODEL_45965301aac1448ba93a6b3db61dc3ca",
      "placeholder": "​",
      "style": "IPY_MODEL_5ff522f700094524aeb83c16347a2d49",
      "value": "Your token has been saved in your configured git credential helpers (store)."
     }
    },
    "df6c1ad49eed4dd1880e15d278dae493": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    },
    "f3209f893b3f448d9de89e217a4178fb": {
     "model_module": "@jupyter-widgets/base",
     "model_module_version": "1.2.0",
     "model_name": "LayoutModel",
     "state": {
      "_model_module": "@jupyter-widgets/base",
      "_model_module_version": "1.2.0",
      "_model_name": "LayoutModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "LayoutView",
      "align_content": null,
      "align_items": null,
      "align_self": null,
      "border": null,
      "bottom": null,
      "display": null,
      "flex": null,
      "flex_flow": null,
      "grid_area": null,
      "grid_auto_columns": null,
      "grid_auto_flow": null,
      "grid_auto_rows": null,
      "grid_column": null,
      "grid_gap": null,
      "grid_row": null,
      "grid_template_areas": null,
      "grid_template_columns": null,
      "grid_template_rows": null,
      "height": null,
      "justify_content": null,
      "justify_items": null,
      "left": null,
      "margin": null,
      "max_height": null,
      "max_width": null,
      "min_height": null,
      "min_width": null,
      "object_fit": null,
      "object_position": null,
      "order": null,
      "overflow": null,
      "overflow_x": null,
      "overflow_y": null,
      "padding": null,
      "right": null,
      "top": null,
      "visibility": null,
      "width": null
     }
    },
    "f4bdd763f6b04096a304de1b3219f8d5": {
     "model_module": "@jupyter-widgets/controls",
     "model_module_version": "1.5.0",
     "model_name": "DescriptionStyleModel",
     "state": {
      "_model_module": "@jupyter-widgets/controls",
      "_model_module_version": "1.5.0",
      "_model_name": "DescriptionStyleModel",
      "_view_count": null,
      "_view_module": "@jupyter-widgets/base",
      "_view_module_version": "1.2.0",
      "_view_name": "StyleView",
      "description_width": ""
     }
    }
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
